
 package br.ufpb.di.ppgi;
 

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;

public class CadastrarProposta extends SeleneseTestCase {
	public void setUp() throws Exception {
		setUp("http://localhost:8080/", "*chrome");
	}
	public void testUntitled() throws Exception {
		selenium.windowMaximize();
		selenium.windowFocus();
		selenium.open("/webppgi/");
		selenium.type("credencial.login", "admin-ppgi@ppgi.di.ufpb.br");
		selenium.type("credencial.plainPassword", "");
		selenium.type("credencial.plainPassword", "admin");
		selenium.clickAt("//input[@value='Entrar']", "30000");
		selenium.waitForPageToLoad("30000");
		selenium.clickAt("link=Solicitar Proposta", "30000");
		selenium.waitForPageToLoad("30000");
		selenium.type("proposta.titulo", "titulo");
		selenium.type("proposta.resumo", "resumo");
		selenium.select("proposta.professor1.id", "label=colegiado1");
		selenium.select("proposta.professor2.id", "label=colegiado2");
		selenium.type("anexo", "D:\\Universidade\\Desafios_portugues.pdf");
		selenium.type("datepicker", "03/08/2010");
		selenium.click("//form[@id='formulario2']/table/tbody/tr[9]/td[2]/select[1]/option[21]");
		selenium.select("hora", "label=17");
		selenium.select("minuto", "label=10");
		selenium.type("proposta.local", "sala 1");
		selenium.clickAt("//input[@value='Agendar Proposta']", "30000");
		selenium.waitForPageToLoad("30000");
		assertEquals("http://localhost:8080/webppgi/admin/processos/", selenium.getLocation());
	}
	
	public static void main(String[] args) throws Exception{
		CadastrarProposta c = new CadastrarProposta();
		c.setUp();
		c.testUntitled();
	}
}
